﻿<phone:PhoneApplicationPage 
    x:Class="PhoneAppCheckSensors.PageMotion"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mylib="clr-namespace:PhoneAppCheckSensors"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" >

    <!--LayoutRoot は、すべてのページ コンテンツが配置されるルート グリッドです-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel は、アプリケーション名とページ タイトルを格納します-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Sensors Sample" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Motion" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - 追加コンテンツをここに入力します-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="72"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
                <RowDefinition Height="48"/>
                <RowDefinition Height="36"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
                <Button Content="Start" Name="buttonStart" Click="buttonStart_Click" />
                <Button Content="Stop" IsEnabled="False" Name="buttonStop" Click="buttonStop_Click" />
                <Button Content="Draw" IsEnabled="False" Name="buttonDraw" Click="buttonDraw_Click" />
            </StackPanel>
            <TextBlock Text="Attitude Pitch" Grid.Row="1" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbAttdP" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Attitude Roll" Grid.Row="3" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbAttdR" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Attitude Yaw" Grid.Row="5" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbAttdY" Grid.Column="5" Grid.Row="5" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Acceleration" Grid.Row="7" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbAccl" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Rotation Rate" Grid.Row="9" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbRR" Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="Gravity" Grid.Row="11" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbGravity" Grid.Column="1" Grid.Row="11"/>
            <TextBlock Text="Timestamp" Grid.Row="13" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="" Name="tbTimestamp" Grid.Column="1" Grid.Row="17" VerticalAlignment="Center" Style="{StaticResource PhoneTextNormalStyle}"/>

            <mylib:GraphPart x:Name="gpAP" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" AxisColor="White" DotColor="Magenta" VerticalLevel="0.5" UnitWidth="200000"/>
            <mylib:GraphPart x:Name="gpAR" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="4" AxisColor="White" DotColor="YellowGreen" VerticalLevel="0.5" UnitWidth="200000"/>
            <mylib:GraphPart x:Name="gpAY" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" AxisColor="White" DotColor="Cyan" VerticalLevel="0.5" UnitWidth="200000"/>
            <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="8">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <mylib:GraphPart x:Name="gpAclX" Grid.Column="0" AxisColor="White" DotColor="Magenta" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpAclY" Grid.Column="1" AxisColor="White" DotColor="YellowGreen" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpAclZ" Grid.Column="2" AxisColor="White" DotColor="Cyan" VerticalLevel="0.5" UnitWidth="200000"/>
            </Grid>
            <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <mylib:GraphPart x:Name="gpRRX" Grid.Column="0" AxisColor="White" DotColor="Magenta" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpRRY" Grid.Column="1" AxisColor="White" DotColor="YellowGreen" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpRRZ" Grid.Column="2" AxisColor="White" DotColor="Cyan" VerticalLevel="0.5" UnitWidth="200000"/>
            </Grid>
            <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="12">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <mylib:GraphPart x:Name="gpGrvX" Grid.Column="0" AxisColor="White" DotColor="Magenta" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpGrvY" Grid.Column="1" AxisColor="White" DotColor="YellowGreen" VerticalLevel="0.5" UnitWidth="200000"/>
                <mylib:GraphPart x:Name="gpGrvZ" Grid.Column="2" AxisColor="White" DotColor="Cyan" VerticalLevel="0.5" UnitWidth="200000"/>
            </Grid>
        </Grid>
    </Grid>
 
    <!--ApplicationBar の使用法を示すサンプル コード-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
